package wisents.wicket.form.formelements;

import wisents.api.formelements.FormElement;

/**
 * User: paul.szulc Date: Jan 15, 2010 Time: 12:22:19 AM
 */
public class WicketFormElement implements FormElement {

    private final String relativePath;
    private final String value;
    private final int choiceIndex;
    private final Class originalElementType;

    public WicketFormElement(String relativePath, String value,
	    Class originalElementType) {
	this(relativePath, value, -1, originalElementType);
    }

    public WicketFormElement(String relativePath, int choiceIndex,
	    Class originalElementType) {
	this(relativePath, "", choiceIndex, originalElementType);
    }

    private WicketFormElement(String relativePath, String value,
	    int choiceIndex, Class originalElementType) {
	this.relativePath = relativePath;
	this.value = value;
	this.choiceIndex = choiceIndex;
	this.originalElementType = originalElementType;
    }

    public String getRelativePath() {
	return relativePath;
    }

    public String getValue() {
	return value;
    }

    public int getChoiceIndex() {
	return choiceIndex;
    }

    public Class getOriginalElementType() {
	return originalElementType;
    }

}
